package com.itbaizhan.service.impl;

import com.itbaizhan.domain.User;
import com.itbaizhan.mapper.UserMapper;
import com.itbaizhan.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 查询所有学生
     * @return
     */
    @Override
    public List<User> findByAll() {
//        System.out.println(10/0);
        // 查询数据库
        List<User> users = userMapper.selectList(null);
        return users;
    }
}
